﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace S.Weaning.Domain.Migrations
{
    public partial class create1 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "LambAblactation",
                columns: table => new
                {
                    LambEarNumberId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ElectronicEarNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    MammalianNumber = table.Column<int>(type: "int", nullable: true),
                    Parity = table.Column<int>(type: "int", nullable: true),
                    TurnOutBuild = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    TurnOutHuts = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    TransferBuilding = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    TransferField = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    WeaningWeight = table.Column<decimal>(type: "decimal(10,2)", nullable: true),
                    WeaningDayAge = table.Column<int>(type: "int", nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsOk = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    WeaningDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    DocumentNumber = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    SerialNumber = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    Notes = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    UserId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_LambAblactation", x => x.LambEarNumberId);
                });

            migrationBuilder.CreateTable(
                name: "MaternalWeaning",
                columns: table => new
                {
                    MaternalWeaningId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    WeaningDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    ElectronicEarNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    LactationDay = table.Column<int>(type: "int", nullable: true),
                    TurnOutBuild = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    TurnOutHuts = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    TransferBuilding = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    TransferField = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    WeaningCount = table.Column<int>(type: "int", nullable: true),
                    TotalweaningWeightg = table.Column<decimal>(type: "decimal(10,2)", nullable: true),
                    SeedMotherWeightg = table.Column<decimal>(type: "decimal(10,2)", nullable: true),
                    SeedMotherWeight = table.Column<decimal>(type: "decimal(10,2)", nullable: true),
                    CreateBy = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    CreateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    UpdateBy = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    UpdateDate = table.Column<DateTime>(type: "datetime2", nullable: true),
                    IsOk = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    DocumentNumber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
                    SerialNumber = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
                    Notes = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
                    UserId = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_MaternalWeaning", x => x.MaternalWeaningId);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "LambAblactation");

            migrationBuilder.DropTable(
                name: "MaternalWeaning");
        }
    }
}
